package sq.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import sq.dao.FoodType;
import sq.dao.Orders;

import javax.transaction.Transactional;
import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: sunquan
 * @Date: 2018/3/30
 * @Time: 14:11
 */
public interface OrdersRepository extends JpaRepository<Orders,Integer> {

    List<Orders> findAllByUserIdOrderByOrdersIdDesc(Integer userId);
    List<Orders> OrderByOrdersIdDesc();
    List<Orders> findAllByStatusOrderByOrdersIdDesc(Integer status);
}
